Optimal. Leaf size=40 \[ \frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {-a-a \sin (c+d x)}}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2852, 210}
\begin {gather*} \frac {2 \sqrt {a} \text {ArcTan}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a (-\sin (c+d x))-a}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 2852
Rubi steps
\begin {align*} \int \csc (c+d x) \sqrt {-a-a \sin (c+d x)} \, dx &=\frac {(2 a) \text {Subst}\left (\int \frac {1}{-a-x^2} \, dx,x,-\frac {a \cos (c+d x)}{\sqrt {-a-a \sin (c+d x)}}\right )}{d}\\ &=\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {-a-a \sin (c+d x)}}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(95\) vs. \(2(40)=80\).
time = 0.06, size = 95, normalized size = 2.38 \begin {gather*} \frac {\left (-\log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sqrt {-a (1+\sin (c+d x))}}{d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.36, size = 69, normalized size = 1.72
method | result | size |
default | \(-\frac {2 \left (1+\sin \left (d x +c \right )\right ) \sqrt {a \left (\sin \left (d x +c \right )-1\right )}\, \sqrt {a}\, \arctan \left (\frac {\sqrt {a \left (\sin \left (d x +c \right )-1\right )}}{\sqrt {a}}\right )}{\cos \left (d x +c \right ) \sqrt {-a -a \sin \left (d x +c \right )}\, d}\) | \(69\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 221, normalized size = 5.52 \begin {gather*} \left [\frac {\sqrt {-a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} + 4 \, {\left (\cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right ) + 3\right )} \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right ) - 3\right )} \sqrt {-a \sin \left (d x + c\right ) - a} \sqrt {-a} - 9 \, a \cos \left (d x + c\right ) + {\left (a \cos \left (d x + c\right )^{2} + 8 \, a \cos \left (d x + c\right ) - a\right )} \sin \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1}\right )}{2 \, d}, \frac {\sqrt {a} \arctan \left (\frac {\sqrt {-a \sin \left (d x + c\right ) - a} {\left (\sin \left (d x + c\right ) - 2\right )}}{2 \, \sqrt {a} \cos \left (d x + c\right )}\right )}{d}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {- a \left (\sin {\left (c + d x \right )} + 1\right )} \csc {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 69 vs.
\(2 (34) = 68\).
time = 0.54, size = 69, normalized size = 1.72 \begin {gather*} -\frac {\sqrt {-a} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}\right ) \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sqrt {-a-a\,\sin \left (c+d\,x\right )}}{\sin \left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________